Skip to content

Conversation

@mpark
Copy link
Member

@mpark mpark commented Aug 23, 2024

The comment talks about left-associative operators twice, when the latter mention is actually describing right-associative operators.

The comment talks about left-associative operators twice, when
the latter mention is actually describing right-associative operators.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Aug 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 23, 2024

@llvm/pr-subscribers-clang

Author: Michael Park (mpark)

Changes

The comment talks about left-associative operators twice, when the latter mention is actually describing right-associative operators.


Full diff: https://github.com/llvm/llvm-project/pull/105784.diff

1 Files Affected:

  • (modified) clang/lib/Parse/ParseExpr.cpp (+1-1)
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 1405aef700bec5..64f284d78b24db 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -607,7 +607,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {
         RHS = ExprError();
       }
       // If this is left-associative, only parse things on the RHS that bind
-      // more tightly than the current operator.  If it is left-associative, it
+      // more tightly than the current operator.  If it is right-associative, it
       // is okay, to bind exactly as tightly.  For example, compile A=B=C=D as
       // A=(B=(C=D)), where each paren is a level of recursion here.
       // The function takes ownership of the RHS.

Copy link
Contributor

@cor3ntin cor3ntin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks (Hi!). Do you have commit access or should I merge that for you?

@mpark
Copy link
Member Author

mpark commented Aug 23, 2024

Thanks (Hi!). Do you have commit access or should I merge that for you?

Hi Corentin! I have commit access 🙂

@mpark mpark merged commit 1821cb3 into llvm:main Aug 23, 2024
@mpark mpark deleted the fix-op-prec-comment branch August 23, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants